package com.paic.icore.test.demo.disruptor;

import com.lmax.disruptor.EventTranslatorOneArg;

import java.nio.ByteBuffer;

/**
 * describe:把输入对象翻译成消息消息对象
 *
 * @author huxingjie
 * @date 2019/03/22
 * @since 3.4
 */
public class Translator implements EventTranslatorOneArg<LongEvent, ByteBuffer> {
    @Override
    public void translateTo(LongEvent event, long sequence, ByteBuffer data) {
        event.set(data.getLong(0));
    }
}


    